package com.peaksport.pkms.system.entity;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.peaksport.framework.base.entity.CoreBaseEntity;
import com.peaksport.framework.base.venum.BaseStringConverter;
import com.peaksport.framework.uuid.PKEntityType;
import com.peaksport.pkms.system.venum.ScheduleStatusEnum;

import lombok.Getter;
import lombok.Setter;

@SuppressWarnings("serial")
@Entity
@Table(name="CT_Task_ScheduleInst")
@Getter
@Setter
public class ScheduleInstEntity extends CoreBaseEntity {
	
	@Column(name="FTitle")
	private String title;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "FScheduleDefId")
	private ScheduleDefEntity scheduleDefEntity;
	@Column(name="FStartTime")
	private Date startTime;
	@Column(name="FFinishTime")
	private Date finishTime;
	@Column(name="FStatus")
	@Convert(converter=BaseStringConverter.class)
	private ScheduleStatusEnum status;
	@Lob 
	@Basic(fetch = FetchType.LAZY) 
	@Column(name="FExpLog")
	private String expLog;
	@Column(name="FInstInServer")
	private String instInServer;
	@Column(name="FAssistKey")
	private String assistKey;
	@Override
	public PKEntityType getEntityType() {
		return PKEntityType.create("5D24ADF3");
	}

}
